/**
 * ClassName: Test
 * Package: PACKAGE_NAME
 * Description:杨辉三角
 *
 * @Author 糕糕
 * @Create 2024-01-29 12:47
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        int[][] angle = new int[10][];

        for (int i = 0; i < angle.length; i++) {

            angle[i] = new int[i + 1];

            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    angle[i][0] = 1;
                    angle[i][j] = 1;
                } else {
                    angle[i][j] = angle[i - 1][j] + angle[i - 1][j - 1];
                }
            }

        }


        for (int i = 0; i < angle.length; i++) {
            for (int j = 0; j < angle[i].length; j++) {
                System.out.print(angle[i][j]);
                System.out.print("\t");
            }
            System.out.print("\n");
        }


    }
}


class RandomNumber {
    public static void main(String[] args) {
        int[] arr = new int[6];
        for (int i = 0; i < arr.length; i++) {// [0,1) [0,30) [1,31)
            arr[i] = (int) (Math.random() * 6) + 1;

            for (int j = 0; j < i; j++) {
                if (arr[i] == arr[j]) {
                    i--;
                    break;
                }
            }
        }

        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
            System.out.print("\t");

        }
    }


}

